﻿using System;
using System.Linq;
using System.Collections.Generic;
using System.Text;
using System.Data;

namespace SmartRfMng.appcode
{
       public class PluBar
    {
        private Int64 m_PluID = 0;
        private string m_BarCode = string.Empty;
        //private string m_BarType = string.Empty;

        public PluBar()
        {

        }

        public PluBar(Int64 iPluID, string sBarCode, string sBarType)
        {
            m_PluID = iPluID;
            m_BarCode = sBarCode;
           // m_BarType = sBarType;
        }

        public PluBar(DataRow dr)
        {
            if (dr == null)
            {
                return;
            }

            m_PluID = Int64.Parse(dr["PluID"].ToString());
            m_BarCode = dr["BarCode"].ToString();
           // m_BarType = dr["BarType"].ToString();
        }

        public Int64 PluID
        {
            get { return m_PluID; }
            set { m_PluID = value; }
        }

        public string BarCode
        {
            get { return m_BarCode; }
            set { m_BarCode = value; }
        }

        //public string BarType
        //{
        //    get { return m_BarType; }
        //    set { m_BarType = value; }
        //}
    }

    public class PluPacket
    {
        private Int64 m_PacketId = 0;
        private Int64 m_PluID = 0;
        //private string m_PackBarCode = string.Empty;
        private string m_PackUnit = string.Empty;
        private float m_PackQty = 0;
        //private string m_PackSpec = string.Empty;
        //private string m_IsPur = string.Empty;
        //private string m_IsDist = string.Empty;
       
        public PluPacket()
        {

        }

        public PluPacket(DataRow dr)
        {
            if (dr == null)
            {
                return;
            }

            m_PluID = Int64.Parse(dr["PluID"].ToString());
            m_PacketId = Int64.Parse(dr["PacketId"].ToString());
            //m_PackBarCode = dr["PackBarCode"].ToString();
            m_PackUnit = dr["PackUnit"].ToString();
            m_PackQty = float.Parse(dr["PackQty"].ToString());
            //m_PackSpec = dr["PackSpec"].ToString();
            //m_IsPur = dr["IsPur"].ToString();
            //m_IsDist = dr["IsDist"].ToString();

        }

        public Int64 PacketId
        {
            get { return m_PacketId; }
            set { m_PacketId = value; }
        }

        public Int64 PluID
        {
            get { return m_PluID; }
            set { m_PluID = value; }
        }

        //public string PackBarCode
        //{
        //    get { return m_PackBarCode; }
        //    set { m_PackBarCode = value; }
        //}

        public string PackUnit
        {
            get { return m_PackUnit; }
            set { m_PackUnit = value; }
        }

        public float PackQty
        {
            get { return m_PackQty; }
            set { m_PackQty = value; }
        }

        //public string PackSpec
        //{
        //    get { return m_PackSpec; }
        //    set { m_PackSpec = value; }
        //}

        //public string IsPur
        //{
        //    get { return m_IsPur; }
        //    set { m_IsPur = value; }
        //}

        //public string IsDist
        //{
        //    get { return m_IsDist; }
        //    set { m_IsDist = value; }
        //}
    }

    public class PluInfo
    {
        //private Int64 m_PluID = 0;
        //private string m_OrgCode = string.Empty;
        // private string m_DepCode = string.Empty;
        //private string m_PluCode = string.Empty;
        //private string m_PluName = string.Empty;
        //private string m_PluMn = string.Empty;
        //private string m_BarCode = string.Empty;
        //private string m_Unit = string.Empty;
        //private string m_Spec = string.Empty;
        //private string m_PluType = string.Empty;
        //private string m_IsMulPacket = string.Empty;
        //private string m_ListPluBarCode = string.Empty; 

        public List<PluPacket> ListPluPacket = new List<PluPacket>();
        //private List<PluBar> l_PluBar = new List<PluBar>();

        public PluInfo()
        {

        }

        public PluInfo(DataRow dr)
        {
            if (dr == null)
            {
                return;
            }

            PluID = Int64.Parse(dr["PluID"].ToString());
            // m_OrgCode = dr["OrgCode"].ToString();
            // m_DepCode = dr["DepCode"].ToString();
            PluCode = dr["PluCode"].ToString();
            PluName = dr["PluName"].ToString();
            Unit = dr["Unit"].ToString();
            Spec = dr["Spec"].ToString();
            UDP10 = dr["UDP10"].ToString();
            UDP11 = dr["UDP11"].ToString();
            //m_PluMn = dr["PluMn"].ToString();
            // m_BarCode = dr["BarCode"].ToString();
            //m_Unit = dr["Unit"].ToString();
            //m_Spec = dr["Spec"].ToString();
            // m_PluType = dr["PluType"].ToString();
            IsMulPacket = dr["IsMulPacket"].ToString();

        }

        public Int64 PluID
        {
            get;
            set;
        }

        //public Int64 PluID
        //{
        //    get { return m_PluID; }
        //    set { m_PluID = value; }
        //}

        //public string OrgCode
        //{
        //    get { return m_OrgCode; }
        //    set { m_OrgCode = value; }
        //}

        //public string DepCode
        //{
        //    get { return m_DepCode; }
        //    set { m_DepCode = value; }
        //}

        public string PluCode
        {
            get;
            set;
        }

        public string PluName
        {
            get;
            set;
        }

        //public string PluMn
        //{
        //    get { return m_PluMn; }
        //    set { m_PluMn = value; }
        //}

        //public string BarCode
        //{
        //    get { return m_BarCode; }
        //    set { m_BarCode = value; }
        //}

        public string Unit
        {
            get;
            set;
        }

        public string Spec
        {
            get;
            set;
        }

        public string UDP10
        {
            get;
            set;
        }

        public string UDP11
        {
            get;
            set;
        }
        //public string PluType
        //{
        //    get { return m_PluType; }
        //    set { m_PluType = value; }
        //}

        public string IsMulPacket
        {
            get;
            set;
        }

        //public List<PluPacket> ListPluPacket
        //{
        //    get { return l_PluPacket; }
        //    set { l_PluPacket = value; }
        //}

        //public List<PluBar> ListPluBar
        //{
        //    get { return l_PluBar; }
        //    set { l_PluBar = value; }
        //}

        public string ListPluBarCode
        {
            get;
            set;
        }
    }

    public class ContainPLu
    {
        public ContainPLu()
        {

        }

        public Int64 PluID
        {
            get;
            set;
        }

        public string PluCode
        {
            get;
            set;
        }

        public string PluName
        {
            get;
            set;
        }

        public string PluType
        {
            get;
            set;
        }

        public int JhCount
        {
            get;
            set;
        }

        public string WMsBillNo
        {
            get;
            set;
        }

        public string Container
        {
            get;
            set;
        }
    }

    public class YwBill
    {
        public YwBill()
        {

        }

        public string Key
        {
            get;
            set;
        }

        public string Value
        {
            get;
            set;
        }
    }

    public class PluBody
    {
        public PluBody()
        {

        }

        public string PluId
        {
            get;
            set;
        }

        public string PluCode
        {
            get;
            set;
        }

        public int SglCount
        {
            get;
            set;
        }
    }
}
